package f5transformation;

import flinkemp.Emp;
import flinkemp.EmpFun;
import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.datastream.SingleOutputStreamOperator;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

public class Map2Sal {
    public static void main(String[] args) throws Exception{
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        env.setParallelism(1);
        DataStreamSource<Emp> data = env.addSource(new EmpFun());
        data.print();

        SingleOutputStreamOperator<String> sal = data.map(data1 ->
                "薪资:"+data1.sal);
        sal.print();
        env.execute();
    }
}
